import http from "@/http";

export const getCameras = (data: any) => http.get(`/web/camera/cameras`, data)
export const startRTSPStream = (data: any) => {
   return http.post(`/web/camera/startRTSPStream`, data);
}
export const stopRTSPStream = (data: any) => {
    return http.post(`/web/camera/stopRTSPStream`, data);
}

export const recordRTSPStream = (data: any): Promise<any> => {
    return http.post(`/web/camera/recordRTSPStream`, data)
    // return new Promise((resolve, reject) => setTimeout(() => resolve('1'), 3000));
}
export const snapshotRTSPStream = (data: any): Promise<any> => {
    return http.post(`/web/camera/snapshotRTSPStream`, data)
    // return new Promise((resolve, reject) => setTimeout(() => resolve('1'), 3000));
}